<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>员工管理管理</title>
</head>
<jsp:include page="/common/meta.jsp"></jsp:include>
<jsp:include page="/common/resource.jsp"></jsp:include>
<!-- 公用方法-->
<script type="text/javascript" src="${base}/common/js/listPageMaster.js"></script>
<!-- 新增，编辑 ，删除 ，查看 js方法-->
<script type="text/javascript">
    /** 分页查询url地址*/
    gridDataUrl = '${base}/hr/staff/StaffController/queryPaged';

    //新增动作
    function add() {
        var addUrl = "${base}/hr/staff/StaffController/goAddPage";
        openEasyuiDialog("员工管理新增", addUrl, 500, 500);
    }

    //编辑动作
    function edit() {
        var row = $("#tblGrid").datagrid("getSelected");
        if (row == null) {
           top.$.messager.alert('提示', '请选择要编辑的数据', 'info');
            return;
        }
        var editUrl = "${base}/hr/staff/StaffController/edit/" + row.id;
        openEasyuiDialog("员工管理编辑", editUrl, 500, 500);
    }
    //查看动作
    function show() {
        var row = $("#tblGrid").datagrid("getSelected");
        if (row == null) {
           top.$.messager.alert('提示', '请选择要查看的数据', 'info');
            return;
        }
        //$("#save").remove();
        var showUrl = "${base}/hr/staff/StaffController/show/" + row.id;
        openEasyuiDialog("员工管理查看", showUrl, 500, 500);
    }


    //删除动作
    function deleteRow() {
        var deleteUrl = "${base}/hr/staff/StaffController/delete";
        var row = $("#tblGrid").datagrid("getSelected");
        if (!row) {
           top.$.messager.alert('提示', '请选择要删除的数据', 'info');
            return;
        }
       top.$.messager.confirm('提示', '确定要删除吗？', function (r) {
            if (r) {
                doDeleteRow(deleteUrl, {
                    "id": row.id
                });
            }
        });
    }
</script>
	<body>
	<div id="layout" class="easyui-layout" style="width: 100%; height: 100%; background: #fff;">
	    <!-- 查询条件 开始 -->
	    <jsp:include page="vo/conditionVO.jsp"></jsp:include>
	    <!-- 查询条件 结束 -->
	    <jsp:include page="page/listComponent.jsp"></jsp:include>
	</div>
	</body>
</html>
